package com.block.product.enums;


import cn.hutool.core.util.StrUtil;
import lombok.Getter;

@Getter
public enum UniStatusEnum {

    INIT("INIT", "初始化")
    ,MATCH_FAILD("MATCH_FAILD", "撞库失败")
    ,WAIT_LOGIN("WAIT_LOGIN", "待登陆")
    ,SUCCESS("SUCCESS", "登陆成功")
    ,FAILED("FAILED", "登陆失败")
    ;

    private String value;
    private String name;

    UniStatusEnum(String value, String name){
        this.value = value;
        this.name = name;
    }

    public static UniStatusEnum getEntityByType(String actionType){
        for (UniStatusEnum typeEnum : values()) {
            if (StrUtil.equals(typeEnum.getValue(), actionType)){
                return typeEnum;
            }
        }
        return null;
    }
}
